package com.vogue.supplymall.order.domain.dao.impl;

import com.vogue.supplymall.order.domain.dao.OrderPaymentDao;
import com.vogue.supplymall.order.domain.mapper.OrderPaymentMapper;
import com.vogue.supplymall.order.domain.model.OrderPayment;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * The type Order payment dao.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-02-05
 */
@Repository("orderPaymentDao")
public class OrderPaymentDaoImpl extends BaseDaoImpl<OrderPayment, Long> implements OrderPaymentDao {
    @Resource
    private OrderPaymentMapper orderPaymentMapper;

    @Override
    public List<OrderPayment> getForOrderId(Long orderId) {
    	Map<String, Object> params = new HashMap<>();
    	params.put("orderId", orderId);
        return selectByWhr0("orderid = #{orderId}", params);
    }
}
